﻿namespace Trackr.Dispatcher.Extensions
{
	/// <summary>
	/// Extension class for IPublish objects
	/// </summary>
	public static class IPublishExtensions
	{
		/// <summary>
		/// Will use the default instance of the dispatcher to publish itself
		/// </summary>
		/// <param name="publisher"></param>
		public static void Publish<T>(this T publisher) where T : Interfaces.IPublish
		{
			Dispatcher.Instance.Publish(publisher);
		}
	}
}
